﻿@{
    /* Global includes for the theme
    ***************************************************************/
    Script.Require("jQuery").AtHead();
    Script.Require("jqueryform");
    Script.Require("bootstrap");

    Script.Require("knockoutjs");
    //Script.Require("knockoutjsmap");
    Script.Require("doT");
    Script.Require("doTTemplateEngine");
    Script.Require("bootstrapvalidate");
    Script.Require("dateformat");
    Script.Require("amberme");
    Script.Require("common");
    Style.Require("bootstrap_style");

    Style.Require("bootstrap_responsive");
    Style.Require("bootstrap_datepicker");
    Style.Require("bootstrap_validate");
    /* Some useful shortcuts or settings
    ***************************************************************/

    Func<dynamic, dynamic> Zone = x => Display(x); // Zone as an alias for Display to help make it obvious when we're displaying zones

    /* Layout classification based on filled zones
    ***************************************************************/

    if (Model.Title != null)
    {
        Model.BeforeContent.Add(Display.Header());
    }

    Model.Footer.Add(Display.Footer());
                /* Inserting some ad hoc shapes
                ***************************************************************/

                // WorkContext.Layout.Header.Add(New.Branding(), "5"); // Site name and link to the home page
                // WorkContext.Layout.AsideSecond.Add(New.User(), "-1"); // Login and dashboard links
                // WorkContext.Layout.Footer.Add(New.BadgeOfHonor(), "5"); // Powered by Orchard

                /* Last bit of code to prep the layout wrapper
                ***************************************************************/
       
}


<div id="layout-main-container">
    <div id="layout-main" class="group">
        <div id="layout-content" class="group">
            @if (Model.Messages != null)
            {
                <div id="messages">
                    @Zone(Model.Messages)
                </div>
            }
            @if (Model.Featured != null)
            {
                <div id="layout-featured" class="group">
                    @Zone(Model.Featured)
                </div>
            }
            @if (Model.BeforeContent != null)
            {
                <div id="before-content">
                    @Zone(Model.BeforeContent)
                </div>
            }
@* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@
            @if (Model.Content != null)
            {
                <div id="content" class="group">
                    @Zone(Model.Content)
                </div>
            }
            @if (Model.AfterContent != null)
            {
                <div id="after-content">
                    @Zone(Model.AfterContent)
                </div>
            }
        </div>
        @if (Model.AsideSecond != null)
        {
            <aside id="aside-second" class="aside-second">
                @Zone(Model.AsideSecond)
            </aside>
        }
    </div>
</div>



<footer id="footer">
    @*<div id="footer-quad" class="group">

        <p class="pull-right">A <a href="http://www.RainbowSharp.com/bootstrap-themes" target="_blank">Nothing主题</a> by <a href="http://www.RainbowSharp.com" target="_blank">小伙伴</a></p>

        <p>&copy; 2013 <a href="http://www.RainbowSharp.com" target="_blank">小伙伴工作室</a></p>

    </div>*@
    @if (Model.Footer != null)
    {
       
     @Zone(Model.Footer)
    }
</footer>



